# import re
# content = 'Hello 123 456 welcome to tuling'
# print(len(content))
# result = re.match('^Hello\s\d\d\d\s\d{3}\s\w\w.?', content)
# print(result)
# print(result.group())
# print(result.span())



import requests
url = 'https://pic.netbian.com/4kmeinv/index_2.html'
headers = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.3'
html = requests.get(url,headers)
res = html.content.decode('gbk')
# print(f'{res}+{type(res)}')
#<img src="/uploads/allimg/210627/000200-16247233206d9c.jpg" alt="李沁海上繁花剧照4k壁纸" />
import re
# res = re.findall('<img src="(.*?)" alt=".*?" />',res,re.S)
# res = re.search('<img(.*?)"(.*?)"\s',res,re.S)
res1 = re.findall('<img.*?(\/uploads.*?)"\s',res,re.S)

print(res1)



# import re
# content = 'http://feier.com/yyds'
# result1 = re.match('http.*?com/(.*?)', content)
# result2 = re.match('http.*?com/(.*)', content)
# print('result1', result1.group(1))
# print('result2', result2.group(1))

# import re
# # 这个修饰符的作用是匹配包括换行符在内的所有字符。
# content = '''Hello 1234567 World_This is a Regex Demo'''
# result = re.match('^He.*?(\d+).*?Demo$', content)
# result = re.match('^He.*?(\d+).*?Demo$', content,re.S)
# print(result.group())




